import request from '@/utils/request'
var qs = require('qs')
export function getAllDepartment() {
  return request({
    url: 'sysOrg/getOrgByParKey',
    method: 'post',
    data: qs.stringify({
      parKey: '-1'
    })
  })
}

export function getDepartmentList(params) {
  return request({
    url: 'sysOrg/list',
    method: 'post',
    data: qs.stringify(params)
  })
}

export function addDepartment(params) {
  return request({
    url: 'sysOrg/saveOrg',
    method: 'post',
    data: qs.stringify(params)
  })
}

export function deleteDepartment(params) {
  return request({
    url: 'sysOrg/deleteOrg',
    method: 'post',
    data: qs.stringify(params)
  })
}

export function changeDepartment(params) {
  return request({
    url: 'sysOrg/input',
    method: 'post',
    data: qs.stringify(params)
  })
}
